-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Improve io::Error::downcast
#149521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve io::Error::downcast
#149521
Conversation
This comment has been minimized.
This comment has been minimized.
3f5c449 to
126b4d2
Compare
|
The |
|
Wow, I somehow managed to convince myself that the Given the current situation, removing this box is probably not beneficial indeed. I'll remove the second commit. |
126b4d2 to
7de190a
Compare
io::Error: avoid double-boxing of "custom" variant on 32 bits targetsio::Error::downcast: avoid reallocation in case of failure
io::Error::downcast: avoid reallocation in case of failureio::Error::downcast:
|
@bors r+ |
Improve `io::Error::downcast` Rewrite this function to help to compiler understand what is going on here.
Rollup of 9 pull requests Successful merges: - #147841 (Fix ICE when applying test macro to crate root) - #149501 (CTFE: avoid emitting a hard error on generic normalization failures) - #149517 (Implement blessing for tidy alphabetical check) - #149521 (Improve `io::Error::downcast`) - #149545 (fix the check for which expressions read never type) - #149549 (Regression test for system register `ttbr0_el2`) - #149579 (Motor OS: fix compile error) - #149595 (Tidying up `tests/ui/issues` tests [2/N]) - #149597 (Revert "implement and test `Iterator::{exactly_one, collect_array}`") r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 9 pull requests Successful merges: - #147841 (Fix ICE when applying test macro to crate root) - #149501 (CTFE: avoid emitting a hard error on generic normalization failures) - #149517 (Implement blessing for tidy alphabetical check) - #149521 (Improve `io::Error::downcast`) - #149545 (fix the check for which expressions read never type) - #149549 (Regression test for system register `ttbr0_el2`) - #149579 (Motor OS: fix compile error) - #149595 (Tidying up `tests/ui/issues` tests [2/N]) - #149597 (Revert "implement and test `Iterator::{exactly_one, collect_array}`") r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 10 pull requests Successful merges: - #149521 (Improve `io::Error::downcast`) - #149544 (Only apply `no_mangle_const_items`'s suggestion to plain const items) - #149545 (fix the check for which expressions read never type) - #149570 (rename cortex-ar references to unified aarch32) - #149574 (Batched compiletest Config fixups) - #149579 (Motor OS: fix compile error) - #149595 (Tidying up `tests/ui/issues` tests [2/N]) - #149597 (Revert "implement and test `Iterator::{exactly_one, collect_array}`") - #149608 (Allow PowerPC spe_acc as clobber-only register) - #149610 (Implement benchmarks for uN::{gather,scatter}_bits) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #149521 - a1phyr:improve_io_error, r=joboet Improve `io::Error::downcast` Rewrite this function to help to compiler understand what is going on here.
Rewrite this function to help to compiler understand what is going on here.